class String
  def to_permalink
    downcase.sub(/^\./, 'dot-').gsub(/\W|\s+/, '-').gsub(/[^a-zA-Z0-9_-]+/, '')
  end
end